package minitweb

import (
	"gitee.com/dennis-mxx/gcode-common/menv"
	"gitee.com/dennis-mxx/gcode-common/mlogger"
	"gitee.com/dennis-mxx/gcode-web/mweb"
)

func LoadWeb(logger *mlogger.TraceLogger) {
	if menv.Environment.Web != nil && menv.Environment.Web.Port != 0 {
		mweb.InitWeb(logger, menv.Environment.Web)
		if menv.Environment.Web.Pprof {
			mweb.InitProf(mweb.Engine)
		}
	}
}
